<!--

  作者: 陈圳佳
  日期: 2015/8/18
  时间: 19:36
-->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../commons/inc.jsp" %>
<div ng-controller="Edit">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">
            <span aria-hidden="true">&times;</span><span
                class="sr-only">关闭</span>
        </button>
        <h6 class="modal-title">添加供应商</h6>
    </div>
    <form role="form" ng-submit="submit()">
        <div class="modal-body">
            <input type="hidden" ng-init="formConfig.action='${ctx}${action}'"/>
            <c:if test="${not empty supplier}">
                <input type="hidden" ng-init="formValue.id='${supplier.id}'"/>
                <input type="hidden" ng-init="formConfig.method='PUT'"/>
            </c:if>
            <div class="form-group" ng-init="formValue.supplierName='${supplier.supplierName}'">
                <label class="control-label" for="supplier-name">供应商名称：</label>
                <input type="text" id="supplier-name" placeholder="请输入供应商名称" class="form-control input-sm"
                       ng-model="formValue.supplierName" required>
            </div>
            <div class="form-group" ng-init="formValue.tel='${supplier.tel}'">
                <label class="control-label" for="tel">联系电话：</label>
                <input type="text" id="tel" placeholder="请输入联系电话"
                       class="form-control input-sm"
                       ng-model="formValue.tel" required>
            </div>
            <div class="form-group" ng-init="formValue.contact='${supplier.contact}'">
                <label class="control-label" for="contact">联系人：</label>
                <input type="text" id="contact" placeholder="请输入联系人"
                       class="form-control input-sm"
                       ng-model="formValue.contact" required>
            </div>
            <div class="form-group" ng-init="formValue.address='${supplier.address}'">
                <label class="control-label" for="address">供应商地址：</label>
                <input type="text" id="address" placeholder="请输入供应商的地址"
                       class="form-control input-sm"
                       ng-model="formValue.address" required>
            </div>
            <div class="form-group" ng-init="formValue.openName='${supplier.openName}'">
                <label class="control-label" for="openname">开户人：</label>
                <input type="text" id="openname" placeholder="请输入开户人姓名"
                       class="form-control input-sm"
                       ng-model="formValue.openName" required>
            </div>
            <div class="form-group" ng-init="formValue.account='${supplier.account}'">
                <label class="control-label" for="account">开户账号：</label>
                <input type="text" id="account" placeholder="供应商的备注"
                       class="form-control input-sm"
                       ng-model="formValue.account" required>
            </div>
            <div class="form-group" ng-init="formValue.remark='${supplier.remark}'">
                <label class="control-label" for="remark">备注：</label>
                <input type="text" id="remark" placeholder="供应商的备注"
                       class="form-control input-sm"
                       ng-model="formValue.remark" required>
            </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">保存</button>
        </div>
    </form>
</div>